package com.cn.jdia.dc.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cn.jdia.dc.dao.TopoInstanceMapper;
import com.cn.jdia.dc.model.TopoInstance;
import com.cn.jdia.dc.service.ITopoInstanceService;

@Service("topoinstanceService")
public class ITopoInstanceServiceImpl implements ITopoInstanceService{

	@Resource
	private TopoInstanceMapper mapper;
	
	@Override
	public TopoInstance getTopoInstanceByProject(String project) {
		return this.mapper.selectByPrimaryKey(project);
	}

	@Override
	public int updateByProject(TopoInstance topoInstance) {
		return this.mapper.updateByPrimaryKeySelective(topoInstance);
	}

	@Override
	public int insertTopoInstance(TopoInstance topoInstance) {
		return this.mapper.insertSelective(topoInstance);
	}

	@Override
	public List<TopoInstance> queryAllTopoInstance() {
		// TODO Auto-generated method stub
		return this.mapper.selectAllInstance();
	}


}
